MARIO KART WII FOR 3DS: BUILD YOUR CIA
======================================

This folder holds no game files. It builds the CIA from your own disc, on
your own computer.


WHAT YOU NEED
-------------
- Your Mario Kart Wii disc, USA version (RMCE01), dumped as .iso or .wbfs.
  RVZ or NKit dumps: convert them to ISO in Dolphin first.
- A Mac, Windows or Linux computer with about 30 GB free and an internet connection.
- These free tools, installed once:
    Xcode command line tools   (Mac only) in Terminal: xcode-select --install
    Git                        https://git-scm.com (Windows: Git for Windows)
    Python 3.11 through 3.14   https://www.python.org/downloads/
                               Python 3.15 is not supported yet.
    Node.js (LTS)              https://nodejs.org
    C++ compiler               (Windows only) in a terminal:
                               winget install MartinStorsjo.LLVM-MinGW.UCRT
    devkitPro, 3DS tools       https://devkitpro.org/wiki/Getting_Started
                               Mac: then in Terminal: sudo dkp-pacman -S 3ds-dev
                               Windows: tick "3DS Development" in the installer


BUILD
-----
1. Mac: double-click "Build MKW CIA.command".
   If macOS blocks it: System Settings > Privacy & Security > Open Anyway.
   Windows: double-click "Build MKW CIA.bat".
   Linux: run  bash "Build MKW CIA.command"  and use your package manager for the tools.
   If devkitPro is not in C:\devkitPro, set DEVKITPRO_WIN to its folder.
2. Drag your disc image into the window and press Return.
3. Wait a few hours. You get:
       build/release/mkw-3ds.cia        the game (small)
       build/release/sd-card/3ds/mkw-3ds  its files (about 3 GB)

If it stops partway, double-click it again; finished steps are skipped.
If it fails, share build-cia-log.txt from this folder when asking for help.


INSTALL
-------
Needs a 3DS with custom firmware (https://3ds.hacks.guide).
1. Open build/release/sd-card/3ds and copy the mkw-3ds folder inside it
   into the 3ds folder on your SD card (so it is at 3ds/mkw-3ds; make a
   3ds folder if the card has none). Don't copy the 3ds folder itself onto
   the card: on a Mac, Finder can replace the card's whole 3ds folder and
   delete your other apps.
   Updating? Your saves are in the card's mkw-3ds folder: copy the new
   files INTO it (select everything inside the new mkw-3ds), don't replace
   the folder.
2. Install mkw-3ds.cia with FBI. Mario Kart Wii appears on the HOME Menu.
3. For sound, run DSP1 once to dump your sound firmware.

QUICK UPDATES
-------------
Updates are a small "update CIA" (about 3 MB) you can install
from your 3DS with FBI or Universal-Updater; see README.md. No rebuilding,
unless the game says its files are out of date.

Performance varies by console and course.
